home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- tech.lib/CloseTech
- tech.lib/InitTech
- tech.lib/NumRexxFnc
- tech.lib/RexxCmd
- tech.lib/RexxFnc
- tech.lib/SendBBSMsg
-
- tech.lib/CloseTech tech.lib/CloseTech
-
- NAME
- CloseTech -- cleanup after the library
-
- SYNOPSIS
- CloseTech()
-
- void CloseTech(void)
-
- FUNCTION
- This function will free everything allocated by InitTech() or
- any other tech.lib function you may have called. This function
- *MUST* be called before exiting your program. You may not call
- any tech.lib function after calling this function.
-
- The function sends a message to TechCon decrementing the opencount
- if it was incremented, and then free the ARexx message port and
- finally close the ARexx library rexxsyslib.library.
-
- INPUTS
-
- RESULT
-
- BUGS
-
- SEE ALSO
- InitTech()
-
- tech.lib/InitTech tech.lib/InitTech
-
- NAME
- InitTech -- initialize the library operations
-
- SYNOPSIS
- InitTech()
-
- void InitTech(void)
-
- FUNCTION
- To initialize tech.lib for use. This function *MUST* be called
- first before calling any other tech.lib function. Remember to
- call CloseTech() respectively when you finish.
-
- This function opens rexxsyslib.library, creates a message port
- for ARexx activity and sends a message to TechCon incrementing
- the opencount.
-
- INPUTS
-
- RESULT
-
- BUGS
-
- SEE ALSO
- CloseTech()
-
- tech.lib/NumRexxFnc tech.lib/NumRexxFnc
-
- NAME
- NumRexxFnc -- Call a numeric ARexx function
-
- SYNOPSIS
- result = NumRexxFnc(function)
-
- long NumRexxFnc(u_char *)
-
- FUNCTION
- This function calls an ARexx function that returns a numeric
- value. It operates similarly to RexxFnc(), but instead of a string,
- it returns you a numeric value. If the port was not found, or the
- function failed, you will get a zero. Actually, this function is
- a "frontend" for RexxFnc(). It calls it and then converts the
- return string to a numeric value. You see, all ARexx functions
- return a character string, whether it is an actual string or
- a number.
-
- Note that a zero might not indicate an error. It may be a valid
- return value from the function. If the return string is invalid,
- ie. not a valid number, you will get -1. Note that -1 might also
- be a valid return.
-
- INPUTS
- function - ARexx function string
-
- RESULT
- result - numeric value returned by the function
-
- BUGS
-
- SEE ALSO
- RexxFnc()
-
- tech.lib/RexxCmd tech.lib/RexxFnc
-
- NAME
- RexxCmd -- Send an ARexx command
-
- SYNOPSIS
- result = RexxCmd(command)
-
- ULONG RexxCmd(UBYTE *)
-
- FUNCTION
- This function will send an ARexx command to the specified port.
- Put the name of the port in the global buffer called APortName.
- The buffer is maintained by tech.lib. The function will create
- a rexx message using rexxsyslib.library and send it to the port.
- Then it will wait for a reply and check the return code. If it
- is zero, everything is OK. Otherwise the function will pass you
- the error code returned.
-
- INPUTS
- command - ARexx command string
-
- RESULT
- result - 0 if everything went OK, or 1 if no port or error returned
-
- BUGS
-
- SEE ALSO
-
- tech.lib/RexxFnc tech.lib/RexxCmd
-
- NAME
- RexxFnc -- Call an ARexx function
-
- SYNOPSIS
- result = RexxFnc(function)
-
- u_char *RexxFnc(u_char *)
-
- FUNCTION
- This function calls an ARexx function and return you the string
- it got back from it. If the function failed for some reason, or
- the port was not found, you will get a NULL pointer.
-
- INPUTS
- function - ARexx function string
-
- RESULT
- result - Pointer to a string returned by the function
-
- BUGS
-
- SEE ALSO
- NumRexxFnc()
-
- tech.lib/SendBBSMsg tech.lib/SendBBSMsg
-
- NAME
- SendBBSMsg -- Send a command or request to TechCon
-
- SYNOPSIS
- outdata = SendBBSMsg(command, indata)
-
- void *SendBBSMsg(UWORD, void *)
-
- FUNCTION
- This function sends a BBS message to TechCon. You can do lots of
- things with BBS messages. For more information about them, refer
- to the TechnoBBS programmer's manual. The command will be sent and
- a reply waited for. If the operation succeeded, you will get a
- pointer to the data returned by TechCon. NULL indicates TechCon
- was not running, or its private port was not found for some reason.
-
- First the command will initialize a BBSMsg structure with the
- information you provide. Then it will find the TechCon port and
- send the message if found. Finally, it waits for a reply and
- extracts the return value from the BBSMsg structure for you.
- The address of the TechCon's private port is kept in a global
- variable called TCP. It is updated each time you call this
- function, and you can check it after the call has returned,
- to see if TechCon was up.
-
- This is not necessary using tech.lib however. The first time
- it sends a BBS message, is when you call InitTech(), and it
- will also check the TCP variable. If it is NULL, your program
- will exit. After that, it will be valid, because TechCon will
- not exit while your program is running due to the fact, that
- we have incremented the opencount. TechCon will exit only when
- there are no openers.
-
- INPUTS
- command - Command ID, see include/techprg.h
- indata - Any data passed to TechCon for the command
-
- RESULT
- outdata - Pointer to any data returned by TechCon or NULL
-
- BUGS
-
- SEE ALSO
-
-